<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8">
    <title>Ng App Unit Tests</title>
    <link rel="stylesheet" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css">
    <script src="../node_modules/zone.js/dist/zone.js"></script>
    <script src="../node_modules/reflect-metadata/Reflect.js"></script>
    <script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
    <script src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
    <script src="../node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>
    <script src="../node_modules/systemjs/dist/system.src.js"></script>
</head>
<body>
    <script>
        var map = {
            'app':                        'js',
            'rxjs':                       '../node_modules/rxjs',
            '@angular':                   '../node_modules/@angular'
        };
        var packages = {
            'app':                        { defaultExtension: 'js' },
            'rxjs':                       { defaultExtension: 'js' },
        };
        var ngPackageNames = [
            'common',
            'compiler',
            'core',
            'http',
            'platform-browser',
            'platform-browser-dynamic',
            'router',
            'router-deprecated',
            'upgrade',
        ];

        // Add package entries for angular packages, bundled (~40 requests)
        ngPackageNames.forEach(function(pkgName) {
            packages['@angular/' + pkgName] = { main: pkgName + '.umd.js', defaultExtension: 'js' };
        });

        System.config({
            map: map,
            packages: packages
        });

        Promise.all([
            System.import('js/models/hero.spec'),
            System.import('js/pipes/my-uppercase.pipe.spec')
        ])
            .then(window.onload)
            .catch(console.error.bind(console));
    </script>
</body>
</html>